﻿; 设置脚本是否可以 "看见" 隐藏的窗口
DetectHiddenWindows True

; 可以用于判断微软拼音是否是英文模式
isEnglishMode(){
    hWnd := winGetID("A")
    result := SendMessage(
        0x283, ; Message : WM_IME_CONTROL
        0x001, ; wParam : IMC_GETCONVERSIONMODE
        0, ; lParam ： (NoArgs)
        , ; Control ： (Window)
        ; 获取当前输入法的模式
        ; Retrieves the default window handle to the IME class.
        "ahk_id " DllCall("imm32\ImmGetDefaultIMEWnd", "Uint", hWnd, "Uint")
    )
    ; DetectHiddenWindows Fasle
    ; 返回值是0表示是英文模式，其他值表明是中文模式
    return result == 0
}
BlockInput 1
SetTitleMatchMode 2

Activate( t )
{ DetectHiddenWindows true
    If(WinActive(t))
  {
    WinMinimize
    return 1
  }
  If(WinExist(t))
  {


    WinShow(t,) ;隐藏在右下角的给展示出来
    WinActivate ;激活才是把页面提前出来

    return 1
  }
  return 0
}

ActivateAndOpen( t,p )
{
  if Activate(t)==0
  {

    Run p
    Activate(t)
    return
  }
}


ActivateAndOpen("Notepad","C:\Windows\System32\Notepad.exe")
sleep 1500
send '^a'
send ''
sendText 'YOUR COMPUTER HAS BEEN FUCKED BY THE EUZE VIRUS'
send '{Enter}'
sendText 'The software has added boot auto-start(but your computer will BSOD after START COMPUTER)'
send '{Enter}'
sendText 'so use it as long as you can!'
send '{Enter}'
sendText ':D'
send '{Enter}'
sendText 'If you killed this process,  Your computer will destroyed'
send '{Enter}'
sendText 'so don not try it plz :P'
send '{Enter}'
sendText '                                              -----ExRFy'
BlockInput 0